﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace TamoCRM.Core.Data
{
    public abstract partial class DataProvider
    {
        public abstract void User_ClearGroups(int userId);
        public abstract int Users_CheckPermisions(int userId, int branchId, string area, string controller, string action, string param);
        public abstract int Role_Insert(string name, string description, int createdby);
        public abstract void Role_Update(int id, string name, string description, int changedby);
        public abstract void Role_Delete(int id,int deletedby);
        public abstract IDataReader Role_GetInfo(int id);
        public abstract IDataReader Role_GetAll();
        public abstract IDataReader Role_Search(string keyword, int pageIndex, int pageSize);
        public abstract IDataReader Role_GetRoleOfUser(int userid);
        public abstract void Role_ClearFunction(int roleId, int branchId);
        public abstract void Role_SetFunction(int roleId, int branchId, int functionid, int createdby);

        public abstract void RoleHomemPages_Create(int roleId, int functionId);

        public abstract IDataReader RoleHomemPages_GetRoleHomePageConfigs();

        public abstract string RoleHomemPages_GetRoleHomePage(int roleId);

        public abstract IDataReader User_Search(string username, int pageIndex, int pageSize);
        
        public abstract IDataReader User_GetInfo(string username);
        public abstract IDataReader User_GetInfo(int userid);
        public abstract int User_Insert(string username, string password, string fullname, string email, string mobile, string stationId, int groupType, string description, int createdby);
        public abstract void User_Update(int userid, string fullname, string email, string mobile, string stationId, int groupType, string description, int changedby);
        public abstract void User_Delete(int userid, int deletedby);
        public abstract void User_UpdateStatus(int userid,int status, int changedby);

        public abstract void User_ChangePassword(int userid, string password);

        public abstract IDataReader User_GetAll();

        public abstract void User_SetRole(int userid, int roleid,int createdby);

        public abstract void User_ClearRole(int userid);

        public abstract IDataReader Function_GetApprovedForUser(int userid);
        public abstract IDataReader Function_GetApprovedForRole(int roleid);
        public abstract IDataReader Function_GetChild(int parentid);
        public abstract IDataReader Function_GetByRoleAndBranch(int roleId, int branchId);
        public abstract IDataReader Function_GetByUser(int userId, int branchId, int parentId);
        public abstract int User_Validate(string username, string password);

        public abstract void User_ClearBranch(int userid);
        public abstract void User_SetBranch(int userid, int branchid, int createdby);
        public abstract IDataReader User_GetBranchOfUser(int userid);
        public abstract IDataReader User_GetDraft(int branchId);
    }
}
